import ItemList from "../components/items/ItemList"
import { useTodosData } from "../hooks/useTodosData"
const TodoView = () => {
  const { todos, deleteTodo, toggleTodo } = useTodosData()
  return (
    <>
      <h1>TodoView</h1>
      <ItemList
        todos={todos}
        onDel={deleteTodo}
        onToggle={toggleTodo}>
        <h2>代办列表</h2>
      </ItemList>
    </>
  )
}

export default TodoView